package com.common;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @Author：Luohuiyong
 * @Description:
 * @Date: Created in 12:05 2019/1/9
 */
@Getter
@Setter
@NoArgsConstructor
public class Result<T> {
    private String errcode;//返回码
    private String errmsg;//请求结果说明
    private T data;//数据对象

    public Result(String errcode, String errmsg) {
        this.errcode = errcode;
        this.errmsg = errmsg;
    }

    public Result(String errcode, String errmsg, T data) {
        this.errcode = errcode;
        this.errmsg = errmsg;
        this.data = data;
    }

    public Result(String errmsg){
        this.errmsg = errmsg;
    }

}
